
package com.tito.t_kulfonkup.fragments;

import java.util.ArrayList;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.tito.t_kulfonkup.Player;
import com.tito.t_kulfonkup.R;

public class CurrentGame extends Fragment {

    ArrayList<Player> players = new ArrayList<Player>();
    Player p1 = new Player("Andk");
    Player p2 = new Player("Seba");
    Player p3 = new Player("Lukasz");
    Player p4 = new Player("Szymon");

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {

        players.add(p1);
        players.add(p2);
        players.add(p3);
        players.add(p4);

        View view = inflater.inflate(R.layout.current_game, container, false);

        TextView tv1 = (TextView) view.findViewById(R.id.player_1);
        TextView tv2 = (TextView) view.findViewById(R.id.player_2);
        tv1.setText(players.get(1).getName());
        tv2.setText(players.get(2).getName());

        return view;
    }

    // private String getPlayerName(ArrayList<Player> list) {
    // String name = null;
    // for (Player p : list) {
    // name = p.getName();
    // }
    // return name;
    // }

    // private ArrayList<RoundGames> makeCouple(String a, String b) {
    //
    // }
}
